<#import "/common/taglibs/spring.ftl" as spring/>
<#macro formHeaderButtons resourceIdentity baseUrl>
<#local btnStyle="btn m-btn m-btn--icon m-btn--icon-only m-btn--pill" />
<#local btnMargin="m--margin-right-10" />
<div class="m-portlet__head-tools">
    <#if op == 'op.edit'>
        <@security.authorize access="hasAuthority('${resourceIdentity!}:delete')">
        <a class="${btnStyle} btn-outline-danger ${btnMargin}" href="${ctx}/${baseUrl!}/${m.id}/delete" title="<@spring.message code="button.delete.tips"/>"
           data-confirmation="true" data-toggle="m-tooltip" data-original-title="<@spring.message code="confirmation.detete"/>"
           data-btn-ok-label="<@spring.message code="yes"/>" data-btn-cancel-label="<@spring.message code="no"/>" >
            <i class="la la-trash"></i>
        </a>
        </@security.authorize>
    </#if>
	<#if op == 'op.view'>
        <@security.authorize access="hasAuthority('${resourceIdentity!}:update')">
            <a data-toggle="m-tooltip" class="${btnStyle} btn-outline-accent ${btnMargin}" href="${ctx}/${baseUrl!}/${m.id}/update" title="<@spring.message code="button.edit.tips"/>">
                <i class="la la-edit"></i>
            </a>
        </@security.authorize>
    </#if>
    <a data-toggle="m-tooltip" class="${btnStyle} btn-outline-metal ${btnMargin}" href="${ctx}/${baseUrl!}" title="<@spring.message code="button.back.tips"/>">
        <i class="la la-undo"></i>
    </a>
</div>
</#macro>